package com.abner.design.patterns.command;

/**
 * 将一个接受者对象与一个命令绑定，调用接受者相应的操作，实现 execute
 * @author abner
 */
public class TVOnCommand implements Command {

	TVReceiver tv;

	public TVOnCommand(TVReceiver tv) {
		super();
		this.tv = tv;
	}

	@Override
	public void execute() {
		tv.on();
	}

	@Override
	public void undo() {
		tv.off();
	}
}
